from django import forms
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
from django.contrib.auth.models import User

class UserRegistrationForm(UserCreationForm):
    username = forms.CharField(label='username', max_length=32)
    email = forms.EmailField(label='email')
    password1 = forms.CharField(label='password1')
    password2 = forms.CharField(label='password2')
    
    class Meta:
        model = User
        fields = ['username', 'email','password1','password2']


class UserLoginForm(AuthenticationForm):
    class Meta:
        model = User
        fields = ['username', 'password1']
